﻿using System;
using System.Web.Mvc;
using System.Web.Routing;

namespace Fuse8.CMF.BaseWebsite.Administration
{ 
    public class CustomCmsAdminRoutes : AreaRegistration
    {
        public override string AreaName
        {
            get 
            {
                return "Base CMF application administration";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute(
                "Cms_Custom", // Route name
                "admin-custom/{controller}/{action}/{id}",// URL with parameters
                new { controller = "PageNotFound", action = "Index", id = UrlParameter.Optional },
                new { isInCustomAdmin = new AdminCustomAreaRouteConstraint() },
                new string[] { "Fuse8.CMF.BaseWebsite.AdminController.Controllers" }
            );
        }
    }
}